'use strict';

// Define some pseudo module globals
var isPro = require('../libs/debug').isPro;
var isDev = require('../libs/debug').isDev;
var isDbg = require('../libs/debug').isDbg;

//
var mongoose = require('mongoose');
mongoose.Promise = global.Promise;

var Schema = mongoose.Schema;

var vcodeSchema = new Schema({
  phone: String,
  code: String,
  created: {
    type: Date,
    default: Date.now,
    expires: 600
  }
});

var Vcode = mongoose.model('Vcode', vcodeSchema);

exports.Vcode = Vcode;
